import Vue from 'vue';
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Login = () => import('./components/login.vue')
const Main = () => import('./view/Main.vue')
const Read = () => import('./view/ReadPoke.vue')
const Write = () => import('./view/WritePoke.vue')
const Look = () => import('./view/lookPoke.vue')
const Author = () => import('./view/Author.vue')
const block = () => import('./view/block.vue')
const update = ()=>import('./view/updatePoke.vue')

const routes = [
  // { path: '', redirect: "/upload" },
  // { path: '/upload', component: upload },

  { path: '', redirect: "/login" },
  { path: '/login', component: Login },
  { path: '/Main',name:'Main', component: Main,
    children:[
      { path: '/Read',name:'Read', component: Read},
      { path: '/Look',name:'Look', component: Look },
      { path: '/Author',name:'Author', component: Author },
      { path: '/Write',name:'Write', component: Write},
      { path: '/update',name:'update', component: update},
      { path: '/block',name:'block', component: block}
    ]
  },

  

]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router